<!-- Header Start -->
<header class="navigation">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <!-- header Nav Start -->
        <nav class="navbar">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
              <img src="{{ site.Params.logo | absURL }}" alt="{{ site.Title }}" class="img-responsive">
            </a>
          </div>
          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="navigation">
            <ul class="nav navbar-nav navbar-right">
              {{ range site.Menus.main }}
              {{ if .HasChildren }}
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                  aria-expanded="false">{{ .Name }} <span class="ion-ios-arrow-down"></span></a>
                <ul class="dropdown-menu">
                  {{ range .Children }}
                  <li><a href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
                  {{ end }}
                </ul>
              </li>
              {{ else }}
              <li><a href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
              {{ end }}
              {{ end }}

              <!-- Language List -->
              {{- if site.IsMultiLingual }}
              <li>
                <select id="select-language" onchange="location = this.value;">
                  {{ $siteLanguages := site.Languages}}
                  {{ $pageLang := .Page.Lang}}
                  {{ range .Page.AllTranslations }}
                  {{ $translation := .}}
                  {{ range $siteLanguages }}
                  {{ if eq $translation.Lang .Lang }}
                  {{ $selected := false }}
                  {{ if eq $pageLang .Lang}}
                  <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>
                    {{ .LanguageName }}
                  </option>
                  {{ else }}
                  <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}
                  </option>
                  {{ end }}
                  {{ end }}
                  {{ end }}
                  {{ end }}
                </select>
              </li>
              {{ end }}
            </ul>
          </div><!-- /.navbar-collapse -->
        </nav>
      </div>
    </div>
  </div>
</header><!-- header close -->